/**
 * Created by wwl on 2018/4/9.
 */
const STORAGE_KEY = 'todos-vuejs'
/**
 * 使用LocalStore存储
 */
let storage = window.localStorage
let cookie = document.cookie
export default {

    get(key){
        return storage.getItem(key);
    },
    put(key, val){
        return storage.setItem(key, val);
    },
    remove(key){
        return storage.removeItem(key);
    },

}

export function addCookie(objName, objValue, objHours) {//添加cookie

}

export function getCookie(objName) {//获取指定名称的cookie的值

}

export function delCookie(name) {//为了删除指定名称的cookie，可以将其过期时间设定为一个过去的时间
    var date = new Date();
    date.setTime(date.getTime() - 10000);
    document.cookie = name + "=a; expires=" + date.toGMTString();
}
